<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.org/ui"
	template="/resources/templates/default.xhtml">

	<ui:param name="pageTitle" value="INICIO" />

	<ui:define name="titulo">
		INICIO
	</ui:define>

	<ui:define name="contenido">
		<h:form>

			<p:dataTable value="#{reservacionBean.listaReservacion}" var="obj"
				editable="true">
				<p:column headerText="ID">
					<h:outputText value="#{obj.id}" />
				</p:column>
				<p:column headerText="Cedula">
					<p:cellEditor>
						<f:facet name="output">
							<h:outputText value="#{obj.clienteCedula}" />
						</f:facet>
						<f:facet name="input">
							<h:inputText value="#{obj.clienteCedula}" />
						</f:facet>
					</p:cellEditor>
				</p:column>

				<p:column headerText="Apellido">
					<p:cellEditor>
						<f:facet name="output">
							<h:outputText value="#{obj.clienteApellido}" />
						</f:facet>
						<f:facet name="input">
							<h:inputText value="#{obj.clienteApellido}" />
						</f:facet>
					</p:cellEditor>
				</p:column>

				<p:column headerText="Email">
					<p:cellEditor>
						<f:facet name="output">
							<h:outputText value="#{obj.clienteMail}" />
						</f:facet>
						<f:facet name="input">
							<h:inputText value="#{obj.clienteMail}" />
						</f:facet>
					</p:cellEditor>
				</p:column>


				<p:column headerText="Habitacion">
					
							<h:outputText value="#{obj.habitacion.id}-#{obj.habitacion.tipo}- #{obj.habitacion.precio}" />
					
				</p:column>
				
				
				
				

				<p:column headerText="Opciones" style="width:50px">
					<p:rowEditor />
					<p:commandButton value="Eliminar" action="#{reservacionBean.eliminar(obj)}" update="@form"/>
				</p:column>
				<p:ajax event="rowEdit" listener="#{reservacionBean.editListener}" />
			</p:dataTable>


		</h:form>



	</ui:define>

</ui:composition>
